<%@ page language="java" contentType="text/html; charset=utf-8" errorPage="/404.jsp" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>登陆</title>
    <style type="text/css">
        /*设置body  背景颜色*/
        body {
            background-color: #ddd;
        }

        /*设置登陆div的样式*/
        .login {
            background-color: #fff;
            width: 340px;
            padding-top: 30px;
            border-radius: 5px;
            margin: 100px auto;
            text-align: center;
        }

        /*设置图片的样式*/
        .login img {
            display: block;
            width: 150px;
            margin: 0 auto;
        }

        /*设置标题的样式*/
        p {
            margin: 5px 0;
            color: #888;
        }

        /*错误信息的p标签*/
        .error-message {
            margin: 10px 0;
            color: #ff0000;
        }

        form {
            padding: 0 30px 20px 30px;
        }

        /*设置所有表单组件的样式*/
        input {
            height: 40px;
            width: 95%;
            margin: 5px 0;
            border: 1px solid #aaa;
            font-size: 14px;
        }

        /*设置表单组件获取输入焦点时的边框样式*/
        input:focus {
            border: 1px solid #d70f18;
        }

        /*设置提交按钮的样式*/
        .input_submit {
            font-size: 20px;
            background-color: #d70f18;
            color: #fff;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div class="login">
    <img src="<c:url value='/image/logo.png'/>" alt="智游">
    <p>公寓信息管理系统</p>
    <form action="<c:url value='/user/login.action'/>" method="post">
        <div>
            <input type="text" id="username" name="username" value="1"
                   placeholder="请输入 id ">
        </div>
        <div>
            <input type="password" id="password" name="password" value="1"
                   placeholder="请输入密码">
        </div>
        <c:if test="${not empty requestScope.login_message}">
            <p class="error-message">${requestScope.login_message}</p>
        </c:if>
        <div><input type="submit" value="登录" class="input_submit"></div>
    </form>
</div>
</body>
</html>